package xinxin.com.FacadePattern.Fund;

import xinxin.com.FacadePattern.NationalDebt.NationalDebt1;
import xinxin.com.FacadePattern.NationalDebt.NationalDebt2;
import xinxin.com.FacadePattern.Realty.Realty1;
import xinxin.com.FacadePattern.Stock.Stock1;
import xinxin.com.FacadePattern.Stock.Stock2;
import xinxin.com.FacadePattern.Stock.Stock3;

public class Fund {
    Stock1 stock1;
    Stock2 stock2;
    Stock3 stock3;

    NationalDebt1 nationalDebt1;
    NationalDebt2 nationalDebt2;

    Realty1 realty1;

    public Fund() {
        stock1 = new Stock1();
        stock2 = new Stock2();
        stock3 = new Stock3();

        nationalDebt1 = new NationalDebt1();
        nationalDebt2 = new NationalDebt2();

        realty1 = new Realty1();
    }

    public void BuyFund() {
        stock1.Buy();
        stock2.Buy();
        stock3.Buy();
        nationalDebt1.Buy();
        nationalDebt2.Buy();
        realty1.Buy();
    }

    public void SellFund() {
        stock1.Sell();;
        stock2.Sell();
        stock3.Sell();
        nationalDebt1.Sell();
        nationalDebt2.Sell();
        realty1.Sell();
    }
}
